<?php 
//require_once('../../libraries/TeamSpeak3/TeamSpeak3.php');
//require_once('/yii/libraries/TeamSpeak3/TeamSpeak3.php');
class Teamspeak3Viewer extends CWidget
{
	private $_user='serveradmin';
	private $_pwd='6rgZxlDZ';
	private $_svr='127.0.0.1';
	private $_port='10011';

public function run(){

	$ts3_ServerInstance = TeamSpeak3::factory('serverquery://' . $this->_user . ':' . $this->_pwd . '@' . $this->_svr . ':' . $this->_port . '/#no_query_clients');
				
	$ts3_ServerInstance->setLoadClientlistFirst(TRUE);
	$this->render('TeamSpeak3Viewer',
	array("ts3_ServerInstance"=>$ts3_ServerInstance,
	));
}
public function setUser($input){
	$this->_user=$input;
}
public function setPwd($input){
	$this->_pwd=$input;
}
public function setServer($input){
	$this->_svr=$input;
}
public function setPort($input){
	$this->_port=$input;
}
}